package cn.zhaoyuening.schoolmates.conf;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

import cn.zhaoyuening.schoolmates.utils.FastFdsClientUtils;

@Configuration
public class WebConfig {
	
	
	/*@Bean
	public HiddenHttpMethodFilter hiddenHttpMethodFilter(){
		HiddenHttpMethodFilter filter = new HiddenHttpMethodFilter();
		return filter;
	}
	@Bean
    public FilterRegistrationBean someFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setFilter(hiddenHttpMethodFilter());
        registration.addUrlPatterns("/*");
        return registration;
    }*/
	
	@Bean(initMethod="init",destroyMethod="destroy")
	//文件服务器
	public FastFdsClientUtils fastFdsClientUtils(){
		FastFdsClientUtils fastFdsClientUtils = new FastFdsClientUtils();
		return fastFdsClientUtils;
	}
	

}
